<!-- header.php -->
<header>
    <nav>
        <div class="nav-top">
			<ul>
				<li><a href="1_homepage.php">Homepage</a></li>
				<li><a href="2_services.php">Services</a></li>
				<li><a href="3_aboutus.php">AboutUs</a></li>
				<li><a href="4_contactus.php">ContactUs</a></li>
				<li><a href="5_reviews.php">Reviews</a></li>
				<li><a href="6_appointment.php">Appointment</a></li>
				<li><a href="7_productorder.php">ProductOrder</a></li>
			</ul>
		</div>
		<div class="nav-bottom">
			<form action="../user/search.php" method="get">
				<input type="text" name="kw" placeholder="input Search card">
				<button type="submit" class="button">Search</button>
			</form>
			<div class="user-info-container">
				<?php
				session_start();
				if (isset($_SESSION['uid']) && isset($_SESSION['uname'])) {
					// 	echo '<div class="user-info">UID: ' . htmlspecialchars($_SESSION['uid']) . '</div>'; 
					echo '<div class="user-info">Username: ' . htmlspecialchars($_SESSION['uname']) . '</div>';
					echo '<a href="login.php" class="logout-button">Logout</a>';
				} else {
					echo '<div class="user-info">Please login.</div>';
					echo '<a href="login.php" class="logout-button">Login</a>';
				}
				?>
			</div>
		</div>
    </nav>
</header>